package com.shortlink.common.base.errcode;


/**
 * 权限服务错误码
 *
 * @author wp
 */
public enum AuthErrorCode implements IErrorCode {
    NO_AUTH("A000101", "没有权限"),
    TOKEN_EXPIRE_ERROR("A000102", "token已过期"),
    TOKEN_ILLEGAL_ERROR("A000103", "token非法"),
    NULL_USERNAME_PASSWORD("A000201", "用户名密码不能为空"),
    INCORRECT_USERNAME_PASSWORD("A000202", "用户名密码不能为空"), ;

    private final String code;
    private final String message;

    AuthErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 错误码
     */
    @Override
    public String code() {
        return code;
    }

    /**
     * 错误信息
     */
    @Override
    public String message() {
        return message;
    }
}
